<html>
<body style="padding:20px;width:650px;">
<title>Basic GO Query</title>
<h1>Basic GO Query</h1>
This is the main interface for queries related to gene ontology (but note that you
can also filter on GO number under the Filter Query interface). 
<p>
The interface allows you to "build" a table
of results from multiple queries, which can be Copied to Clipboard, 
Exported, or view the individual HitIDs (or SeqIDs) with "View Selected Hit". 
<p>
Search by string:  
<ul>
<li><b>ID:</b> The GO number, e.g. GO:0003674, or 3674. (<i>Must use one of these formats!</i>).
<li><b>Description:</b> All GO descriptions are searched for the substring.
</ul>

Search by other features (see below for detailed description):
<ul>
<li><b>Type:</b> The top-level category (e.g., biological_process)
<li><b>Level:</b> The level<sup>1</sup> (or range of levels) in the GO tree
<li><b>DE:</b> see DE below.
</ul>
<p>
Select one or more search criteria and press "ADD TO TABLE" to execute the search.
<br>Columns can be added/removed ("Select Columns"), 
rearranged by dragging and sorted. 
<p>
To see the sequences associated to a given GO, select it in the table and press
"View Selected GO". 
<p>
<p>
<b>Buttons at bottom of table:</b> 
<ul>
<li>Delete all: deletes everything in the table. If you do not want to append 
the results of a query to the existing results, you will need to specifically
delete the existing results.
<li>Unselect: if you have a sequence selected, this will unselect it.
<li>Delete selected: delete the selected sequence from the table.
<li>Keep selected: delete everything except the selected.
</ul>
You can select multiple sequences by holding down the 'shift' or 'ctrl' keys
 while selecting sequences.
<p>
<h3>DE: Differential expression columns and filters</h3>
If differential expression p-values for GO have been computed using the GOseq package, 
then you will see a row labeled "DE" on the main window; otherwise, ignore this section.
<p>
You can filter on the DE values as follows:
<br>
1. In the "Select Columns" menu, select the DE columns which you wish to filter on. These
will also be shown in the results table. 
<br>
2. On the "DE" row of the main window, check the checkbox to activate it, 
and enter your p-value threshold in the "Threshold" box. 
<br>
3. Also, choose one of the two
options for applying the threshold, either: A) show results for which
any of the selected DE columns passes the threshold, or B) show results for which all columns pass.
<br>
4. Note, if you wish to filter on certain DE columns, but view different ones in the table, you can
select different columns in "Select Columns" <i>after</i> running the desired searches. 
<p>
In order to help identify the GOs most worthy of investigation, a 
"DETrim" subset of the GO terms is automatically computed, as follows:
<ol>
<li>Find all GO terms passing the specified DE filter ("passed" set).
<li>For all passed GOs, compute the product of their p-values ("combDE").  For failed GOs, set combDE to 2.
<li>Each GO term is examined, along with its children in the GO hierarchy. If there is a child with
better combDE score than the parent, the parent is removed; otherwise, the children are removed. 
<li>The remaining, non-removed GO terms are the DETrim subset. 
</ol>
<p>
Select "DETrim" to view only the trimmed GO set.
<p>Justification:
Higher level nodes contain transcripts found in lower levels, i.e. a lower level has 
either a 'part-of' or 'is-a' relation to the higher level. Therefore, there is considerable
redundancy in DE enrichment scores between different levels of the hierarchy and it makes
sense to single out those GOs which appear to be primarily responsible for the enrichment
in a given sub-tree.
<ul>
<li>If a parent (i.e. higher level node) has a better DE score than any of its children, that 
indicates that the differential effect is happening biologically at the level of the parent, and
being inherited by those children, if any, which also are DE-enriched. 
<li>Conversely, if a parent has a worse DE score than one of its children, it indicates that the differential
effect is happening biologically at the child level (or below).
</ul>
<b>Show as tree:</b> 
<br>
Select this option to see the GO terms placed within the full GO hierarchy.  
Note that the GO "tree"is actually a Directed Acyclic Graph,
so that a GO can have more than one "parent", and hence can appear multiple times in the
hierarchy, and at different levels.
<p><b>Color-coding:</b>
<br>
If DE values have been computed, then table entries are color-coded as follows: 
<br>&nbsp;&nbsp;&nbsp;&nbsp;Green row - passed and selected for the DETrim subset. 
<br>&nbsp;&nbsp;&nbsp;&nbsp;White row - passed but not selected for DETrim. 
<br>&nbsp;&nbsp;&nbsp;&nbsp;Gray row (in tree view only) - failed.



  
<hr>
<sup>1</sup>A GO term can exist at multiple locations of the "tree", and at different levels, 
 since there can be multiple paths from the top term to the given GO. When querying on level,
a GO term will only be shown at its lowest level, e.g. if its found at level 2,4 and 5 it 
will only be shown as level 5.
